#ifndef PENDINGCONNECTION_H
#define PENDINGCONNECTION_H

#include <QThread>
#include <QMutex>
#include <QWaitCondition>
extern "C"
{
#include <winsock2.h>
}
class ClientRequest;

class PendingConnection : public QThread
{
Q_OBJECT
public:
	explicit PendingConnection(SOCKET socket, QObject *parent = 0);
	SOCKET getSocket() const
	{
		return m_Socket;
	}
signals:
	void newRequest(ClientRequest* request);
protected:
	void run();
private:
	SOCKET m_Socket;
	QMutex m_WaitMutex;
	QWaitCondition m_WaitCondition;
};

#endif // PENDINGCONNECTION_H
